package com.learn.spring;

import org.omg.CORBA.PUBLIC_MEMBER;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

public class Car {

    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
        Car car = (Car) ctx.getBean("car1");
        Car car1 = (Car) ctx.getBean("car1");
        System.out.println(car.toString());
    }

    int no;
    String chepai;
    Map<String,HelloWord> hello;

    public Car(){
        System.out.println("创建一个car");
    }

    public Car(int no){
        this.no = no;
    }

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        this.no = no;
    }

    public String getChepai() {
        return chepai;
    }

    public void setChepai(String chepai) {
        this.chepai = chepai;
    }

    public Map<String, HelloWord> getHello() {
        return hello;
    }

    public void setHello(Map<String, HelloWord> hello) {
        this.hello = hello;
    }

    @Override
    public String toString() {
        return "Car{" +
                "no=" + no +
                ", chepai='" + chepai + '\'' +
                ", hello=" + hello +
                '}';
    }
}
